<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <title>智联同城——小程序管理系统</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta name="apple-mobile-web-app-status-bar-style" content="black"> 
  <meta name="apple-mobile-web-app-capable" content="yes">
  <meta name="format-detection" content="telephone=no">
  
  <link rel="stylesheet" href="__PUBLIC__/layui/css/layui.css"  media="all">
  <style type="text/css">
  .tongji-box{
    text-align: center;
    background: #63BA79;
    padding:20px;
    color: #fff;
  }
  .tongji-title{
    font-size: 26px;
  }
  .tongji-num{
    font-size: 24px;
  }
  #chart-box{
    margin-top: 30px;
    height: 500px;
  }
  </style>
</head>
<body>
<div class="layui-layout layui-layout-admin">
  <div class="layui-header">
    <div class="layui-logo">智联同城</div>
    <!-- 头部区域（可配合layui已有的水平导航） -->
    <ul class="layui-nav layui-layout-left">
      <li class="layui-nav-item "><a href="{:U('Index/index')}">首页</a></li>
      <li class="layui-nav-item"><a href="{:U('InfoCate/index')}">分类信息管理</a></li>
      <li class="layui-nav-item"><a href="{:U('ShopCate/index')}">好店管理</a></li>
      <li class="layui-nav-item"><a href="{:U('Quan/index')}">同城圈管理</a></li>
      <li class="layui-nav-item"><a href="{:U('Member/index')}">用户管理</a></li>
      <li class="layui-nav-item"><a href="{:U('Takeout/index')}">餐饮管理</a></li>
      <li class="layui-nav-item layui-this" ><a href="{:U('Credit/flash')}">积分商城</a></li>
      <li class="layui-nav-item"><a href="{:U('Home/Index/index')}">切换小程序</a></li>
    </ul>
    <ul class="layui-nav layui-layout-right">
      <li class="layui-nav-item">
        <a href="javascript:;">
          <img src="{$Think.session.wechat.headimg}" class="layui-nav-img">
          {$Think.session.wechat.nickname}
        </a>
        <dl class="layui-nav-child">
          <dd><a href="{:U('Home/Index/index')}">切换小程序</a></dd>
          <!-- <dd><a href="">安全设置</a></dd> -->
        </dl>
      </li>
      <li class="layui-nav-item">
        <a href="javascript:;">
          <img src="{$Think.session.headimgurl}" class="layui-nav-img">
          {$Think.session.nickname}
        </a>
        <dl class="layui-nav-child">
          <dd><a href="{:U('Home/Public/logout')}">退出登录</a></dd>
          <!-- <dd><a href="">安全设置</a></dd> -->
        </dl>
      </li>
    </ul>
  </div>
  
  <div class="layui-side layui-bg-black">
    <div class="layui-side-scroll">
      <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
      <ul class="layui-nav layui-nav-tree"  lay-filter="test">
        <li class="layui-nav-item">
          <a class="" href="javascript:;">装修</a>
          <dl class="layui-nav-child">
            <dd class=""><a href="{:U('credit/flash')}">&nbsp;&nbsp;&nbsp;&nbsp;轮播管理</a></dd>
          </dl>
        </li>
        <li class="layui-nav-item">
          <a class="" href="javascript:;">积分商品</a>
          <dl class="layui-nav-child">
            <dd class=""><a href="{:U('credit/goodsCate')}">&nbsp;&nbsp;&nbsp;&nbsp;分类管理</a></dd>
          </dl>
          <dl class="layui-nav-child">
            <dd class=""><a href="{:U('credit/goodsAdmin')}">&nbsp;&nbsp;&nbsp;&nbsp;商品管理</a></dd>
          </dl>
        </li>
        <li class="layui-nav-item">
          <a class="" href="javascript:;">设置</a>
          <dl class="layui-nav-child">
            <dd class=""><a href="{:U('credit/setBasic')}">&nbsp;&nbsp;&nbsp;&nbsp;基本设置</a></dd>
          </dl>
        </li>
        <li class="layui-nav-item">
          <a class="" href="javascript:;">积分签到</a>
          <dl class="layui-nav-child">
            <dd class=""><a href="{:U('Credit/sign_set')}">&nbsp;&nbsp;&nbsp;&nbsp;签到设置</a></dd>
          </dl>
        </li>
        <li class="layui-nav-item">
          <a class="" href="javascript:;">兑换审核</a>
          <dl class="layui-nav-child">
            <dd class=""><a href="{:U('Credit/examinePro')}">&nbsp;&nbsp;&nbsp;&nbsp;待审核</a></dd>
          </dl>
          <dl class="layui-nav-child">
            <dd class=""><a href="{:U('Credit/examineProd')}">&nbsp;&nbsp;&nbsp;&nbsp;已审核</a></dd>
          </dl>
          <!--<dl class="layui-nav-child">-->
            <!--<dd class=""><a href="{:U('Credit/examineProNo')}">&nbsp;&nbsp;&nbsp;&nbsp;已拒绝</a></dd>-->
          <!--</dl>-->
        </li>
      </ul>
    </div>
  </div>
  
  <div class="layui-body">
    <!-- 内容主体区域 -->
    <div style="padding:0 15px;">
      <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
        <legend>数据统计</legend>
      </fieldset>
      <div class="layui-row layui-col-space10">
        <div class="layui-col-md4">
          <div class="tongji-box">
            <div class="tongji-num">0</div>
            <div class="tongji-title">转发次数</div>
          </div>
        </div>
        <div class="layui-col-md4">
          <div class="tongji-box">
            <div class="tongji-num">0</div>
            <div class="tongji-title">转发人数</div>
          </div>
        </div>
        <div class="layui-col-md4">
          <div class="tongji-box">
            <div class="tongji-num">0</div>
            <div class="tongji-title">累计用户数</div>
          </div>
        </div>
      </div>

      <div id="chart-box"></div>
      <form class="layui-form" action="">
        <div class="layui-form-item">
          <label class="layui-form-label">骗审开关</label>
          <div class="layui-input-block">
            <input type="checkbox" <if condition="$pian eq 1">checked=""</if>  name="close" lay-skin="switch" lay-text="ON|OFF" lay-filter="test">
          </div>
        </div>


      </form>
    </div>
  </div>
  
  <div class="layui-footer">
    <!-- 底部固定区域 -->
    © 2017-2018 <a href="https://www.58zltc.com" target="_blank">智联同城</a> All Rights Reserved.
  </div>
</div>
<script src="__PUBLIC__/js/echarts.min.js" charset="utf-8"></script>
<script src="__PUBLIC__/layui/layui.js" charset="utf-8"></script>
<script>
//JavaScript代码区域
layui.use(['form','upload','element','laypage','layer'], function(){
  var element = layui.element;
  var form = layui.form
          ,$ = layui.jquery

  form.on('switch(test)', function(data){
    if(data.elem.checked){
      //开
      var status = 1;
    }else{
      //关
      var status = 0;
    }
    $.post("{:U('pian')}", {status: status}, function(e) {
      if(e.status == 1){
        layer.msg(e.info,{icon: 6,time:1000});
        setTimeout("location.reload()",1000);
      }else{
        layer.msg(e.info,{icon:1,time:1000});
      }
    });
  });
});



var myChart = echarts.init(document.getElementById('chart-box'));
var option = {
    title: {
        text: '一周趋势'
    },
    tooltip: {},
    legend: {
        data:['访问次数','访问人数']
    },
    xAxis: {
        data: ["2017-10-12","2017-10-13","2017-10-14","2017-10-15","2017-10-16","2017-10-17","2017-10-18"]
    },
    yAxis: {},
    series: [{
        name: '访问次数',
        type: 'bar',
        data: [2, 2, 3, 4, 5, 6, 7]
    },{
        name: '访问人数',
        type: 'bar',
        data: [1, 1, 2, 1, 2, 3, 5]
    }],
    color: ['#FFB800','#FF5722', '#01AAED', '#5FB878', '#91c7ae','#749f83',  '#ca8622', '#bda29a','#6e7074', '#546570', '#c4ccd3']
};
myChart.setOption(option);
</script>
</body>
</html>
